package com.pt25.base.dep.shardingjdbc.datasource;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * 该类起到路由数据源的作用,从线程上下文中获取数据连接
 */
public class MultiDatasource extends AbstractRoutingDataSource {

    @Override
    protected Object determineCurrentLookupKey() {
        return MultiDatasourceContext.getDataSource();
    }

}
